package com.zygh.dlqwservice.module.controller.pc;


import com.zygh.dlqwservice.common.anno.PcLog;
import com.zygh.dlqwservice.common.pcdomain.ResponseDTO;
import com.zygh.dlqwservice.constant.SwaggerTagConst;
import com.zygh.dlqwservice.module.entity.Problem;
import com.zygh.dlqwservice.module.entity.ProblemType;
import com.zygh.dlqwservice.module.service.IProblemTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import sun.awt.SunHints;

import javax.annotation.Resource;
import java.util.LinkedList;
import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author lee
 * @since 2020-12-24
 */
@RestController
@RequestMapping("/problem-type")
@Api(tags = {SwaggerTagConst.Admin.PROBLEM_TYPE})
public class ProblemTypeController {

    @Resource
    private IProblemTypeService problemTypeService;

    @ApiOperation(value = "查询所有问题类型列表")
    @PostMapping("/findAll")
    @PcLog(logType = "1", module = SwaggerTagConst.Admin.PROBLEM_TYPE, content = "查询所有问题类型列表")
    public ResponseDTO<List<ProblemType>> findAll() {
        List<ProblemType> list = problemTypeService.list();
        return ResponseDTO.succData(list);
    }

}
